/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.me.androidhelloapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

/**
 *
 * @author rlutz
 */
public class MainActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        Intent i = null;
		i = getIntent();

		String action = i.getAction();

		if (action != null && action.equals("com.apress.START_THE_MUSIC")) {
                    Log.v("Main", "MainActivity");
                    setContentView(R.layout.main);
                    startService(new Intent("com.apress.START_AUDIO_SERVICE"));
		}
		else
                    finish();
	}
        //myTts = new TTS(this, ttsInitListener, true);
    }

//    private TTS.InitListener ttsInitListener = new TTS.InitListener() {
//        public void onInit(int version) {
//
//          myTts.speak("Hello world", 0, null);
//        }
//    };


//}
